Fix stale inline CSS in server-rendered HTML during dev#16783
Open
astrobot-houston wants to merge 1 commit into
Open
Fix stale inline CSS in server-rendered HTML during dev#16783astrobot-houston wants to merge 1 commit into
astrobot-houston wants to merge 1 commit into
Conversation
…to prevent stale inline styles
1 task
🦋 Changeset detectedLatest commit: 835502c The changes in this PR will be included in the next version bump. This PR includes changesets to release 417 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
<style>tags in server-rendered HTML after CSS file edits during dev. CSS changes now properly update both client-side HMR and server-side inline styles, eliminating the flash of old CSS (FOUC) on fresh page loads.virtual:astro:dev-css:*modules in both the SSR module graph and module runner evaluation cache when style files change during HMR. This ensures the next SSR render picks up fresh CSS while preserving the performance benefit of skipping full page reloads for CSS-only changes.Testing
packages/astro/test/units/dev/hmr-css-invalidation.test.tswith 5 test cases covering CSS/SCSS invalidation, module graph behavior, non-style change passthrough, and edge cases.Docs
Closes #16780